$(function() {
	new Vue({
		el: '#rejectGoodListApp',
		data: {
			currentPage:100,
			fullscreenLoading:false,
			searchdeliver:"",
			tableData:[ ],
		},
		created:function(){
			parent.vueData.$data.hreHtml="../rejectGoodList/index.html";
			parent.vueData.activeIndex  = "7";
			parent.vueData.getLeftNav("7")
			parent.vueData.$data.categoryIndex = 4
		    this.getRejectGoodList()
		},
		methods: {
			
			getRejectGoodList(){
				this.fullscreenLoading = true;
				let shopId  = getShopId();
				let param = {
					shopId: shopId,
					admin_grade:"1",
					
				}
				axios({
					url: POSTURL.selectRefundOrder,
					method: 'post',
					data: param
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
						 this.tableData = [] ;
						 this.tableData = response.data.result;
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			},
			handleConfigGood(val){
				this.fullscreenLoading = true;
				let param = {
					id: val.id,
					admin_grade:"1",
				}
				axios({
					url: POSTURL.refundReceipt,
					method: 'post',
					data: param
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
					this.$message({
						showClose: true,
						message: response.data.message,
						type: 'success'
					});
					 this.getRejectGoodList()
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			}
			
		}
	})
})